//
//  CarBuilder.swift
//  Car
//
//  Created by mac on 2017/10/30.
//  Copyright © 2017年 RRC. All rights reserved.
//

import Foundation

public  class CarBulider {
    
    public func setSequence(sequence:Array<String>){}
    
    public func getCarMOdel() -> CarModel{
        let carModel = CarModel()
        return carModel
    }
    
}


public class BenzBuilder: CarBulider {
    
    private var benz = BenzModel()
    
    override public func getCarMOdel() -> CarModel {
        return self.benz
    }
    
    override public func setSequence(sequence: Array<String>) {
        self.benz.setSequence(sequence: sequence)
    }
}

public class BMWBuilder: CarBulider {
    private var bmw = BMWModel()
    
    override public func getCarMOdel() -> CarModel {
        return self.bmw
    }
    
    override public func setSequence(sequence: Array<String>) {
        self.bmw.setSequence(sequence: sequence)
    }
}
